
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
import { ListTableCollectionDetail } from '../utils/trueType'
export const useDrawerStore = defineStore('drawer', {
    state: () => ({
        drawer: ref(false),
        drawerSource:ref(false),
        container: {
            id: null,
            internalId: '',
            name: '',
            alternateName: '',
            subcategory: '',
            period: '',
            description: '', // 初始化默认值
            preservationStatus: '',
            weight: null,
            currentLocation: '',
            status: '',
            acquisitionDate: null,
            isDeleted: null,
            img: '',
        } as ListTableCollectionDetail // 类型断言
    }),
    actions: {
        setDrawer() {
            this.drawer = !this.drawer
        },
        changeDrawerSource(){
            this.drawerSource = !this.drawerSource
        },
        setContainer(container: ListTableCollectionDetail) {
            this.container = container
        }
    },
    getters: {

    },
}
)